package com.zaaach.citypicker.model;

import com.zaaach.citypicker.utils.PinyinUtils;

import java.io.Serializable;

/**
 * author zaaach on 2016/1/26.
 */
public class City implements Serializable {
    private String name;
    private int addessId;
    private String pinyin;

    public City() {
    }

    public City(String name, String pinyin) {
        this.name = name;
        this.pinyin = pinyin;
    }

    public City(String name, int addessId) {
        this.name = name;
        this.pinyin = PinyinUtils.getPingYin(name);
        this.addessId = addessId;
    }

    public int getAddessId() {
        return addessId;
    }

    public void setAddessId(int addessId) {
        this.addessId = addessId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        pinyin = PinyinUtils.getPingYin(name);
        this.name = name;
    }

    public String getPinyin() {
        return pinyin;
    }

    public void setPinyin(String pinyin) {
        this.pinyin = pinyin;
    }

}
